/**
 * Created by Administrator on 15-11-10.
 */
window.onload=function(){
    var orderId = $.getUrlParam("orderId");
    var url=getUrl();
    $.jsonp({
        url: 'http://'+url+'/api/order/order_detail-'+orderId,
        data: {orderId:orderId},
        callbackParameter: "callback",
        success: function (data, textStatus, xOptions) {
            var complied_tpl = juicer($("#zhifu_tpl").text());
            var html = complied_tpl.render(data);
            $(".ui-border-t").append(html);
        },
        error: function (xOptions,textStatus) {
        }
    });


  $('.ui-btn-lg').click(function() {
       $.jsonp({
           url: 'http://'+url+'/api/order/test_pay',
           data: {orderId:orderId,payChannel:1},
           callbackParameter: "callback",
           success: function (data, textStatus, xOptions) {
//               payByAlipay(data.subject,data.body,data.total_fee,data.out_trade_no,data.notify_url);
               goPay(orderId);
            },
            error: function (xOptions,textStatus) {
            }
       });
  });
}
